<?php
    // TITLE:
    // FILE:
    // AUTHOR:
    // DATE:

    // START DATE
    $startDate = $event->getStartDate();
    $eventStartMonth = $startDate->getMonth();
    $eventStartDay = $startDate->getDay();
    $eventStartYear = $startDate->getYear();
        
    // END DATE
    $endDate = $event->getEndDate();
    $eventEndMonth = $endDate->getMonth();
    $eventEndDay = $endDdate->getDay();
    $eventEndYear = $endDate->getYear();
    
    // Times
    $startTime = $event->getStartTime();
    $startHour = $startTime->getHour();
    $startMin = $startTime->getMinute();
    $endTime = $event->getEndTime();
    $endHour = $endTime->getHour();
    $endMin = $endTime->getMinute();
?>

<h3>Event: <?php echo $event->getTitle(); ?></h3>

<input type="hidden" name="id" value="<?php echo $event->getId(); ?>"><br>
<input type="text" name="title" value="<?php echo $event->getTitle(); ?>"> <label>Title</label><br>
<textarea name="description" cols="50" rows="10"></textarea>
<!-- TALLYS -->

Locations<br>
Sub-Events<br>
Addresses<br>
Guest Lists<br>
Guests<br>
Polls<br>
Vendors<br>
Contacts<br>

<!-- START DATE -->

<select name="startMonth">
    <?php foreach ($months as $month) {
        $id = $month->getId();
        $abb = $month->getAbbreviation();
        $selected = ($id == $eventStartMonth->getId()) ? ' selected' : null;
        echo '<option value="' . $id . '"' . $selected . '>' . $abb . '</option>';}
    ?>
</select>

<select name="startDay">
    <?php for ($i = 1; $i <= 31; $i++) {
        $selected = ($i == $eventStartDay) ? ' selected' : null;
        echo '<option value="' . $id . '"' . $selected . '>' . $i . '</option>';}
    ?>
</select>

<select name="startYear">
    <?php for ($i = 2000; $i <= 3000; $i++) {
        $selected = ($i == $eventStartYear) ? ' selected' : null;
        echo '<option value="' . $id . '"' . $selected . '>' . $i . '</option>';}
    ?>
</select>

<br>

<select name="startHour">
    <?php for ($i = 0; $i < 24; $i++) {
        $selected = ($i == $eventStartHour) ? ' selected' : null;
        echo '<option value="' . $id . '"' . $selected . '>' . $i . '</option>';}
    ?>
</select>
:
<select name="startMinute">
    <?php for ($i = 0; $i < 60; $i++) {
        $selected = ($i == $eventStartMinute) ? ' selected' : null;
        echo '<option value="' . $id . '"' . $selected . '>' . $i . '</option>';}
    ?>
</select>

<!-- END DATE -->

<select name="endMonth">
    <?php foreach ($months as $month) {
        $id = $month->getId();
        $abb = $month->getAbbreviation();
        $selected = $eventEndMonth->getId();
        echo '<option value="' . $id . '"' . $selected . '>' . $abb . '</option>';}
    ?>
</select>
 
<select name="endDay">
    <?php for ($i = 1; $i <= 31; $i++) {
        $selected = ($i == $eventEndDay) ? ' selected' : null;
        echo '<option value="' . $id . '"' . $selected . '>' . $i . '</option>';}
    ?>
</select>

<select name="endYear">
    <?php for ($i = 2000; $i <= 3000; $i++) {
        $selected = ($i == $eventEndYear) ? ' selected' : null;
        echo '<option value="' . $id . '"' . $selected . '>' . $i . '</option>';}
    ?>
</select>

<br>

<select name="endHour">
    <?php for ($i = 0; $i < 24; $i++) {
        $selected = ($i == $eventEndHour) ? ' selected' : null;
        echo '<option value="' . $id . '"' . $selected . '>' . $i . '</option>';}
    ?>
</select>
:
<select name="endMinute">
    <?php for ($i = 0; $i < 60; $i++) {
        $selected = ($i == $eventEndMinute) ? ' selected' : null;
        echo '<option value="' . $id . '"' . $selected . '>' . $i . '</option>';}
    ?>
</select>